package com.hotel.mapper;

import com.hotel.pojo.Dept;
import com.hotel.pojo.User;
import com.hotel.vo.SysResult;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

public interface DeptMapper {

    @Select("select count(1) from dept")
    Long getTotal();

    List<Dept> findDeptListByPage(@Param("start") int start,
                                  @Param("size") int size,
                                  @Param("query") String query);


    @Select("select d.dept_id,d.dept_name from dept d where dept_id=#{deptId}")
    Dept findDeptById(Integer deptId);
}
